import axios from "@/utils/request";

//获取通知
export function getInformList(userId: number, type: number[], current: number, size: number) {
    return axios({
        url: `/user/inform/web/getInformList/${userId}/${type}/${current}/${size}`,
        method: "get"
    })
}

//修改是否已读
export function updateIsRead(userId: number, id: number) {
    return axios({
        url: `/user/inform/web/updateIsRead/${userId}/${id}`,
        method: "put"
    })
}

//获取系统通知
export function getSystemInform(type: number, current: number, size: number) {
    return axios({
        url: `/user/inform/web/getSystemInform/${type}/${current}/${size}`,
        method: "get"
    })
}

//获取当前用户收到的好友邀请
export function getInviteList(userId: number, current: number, size: number) {
    return axios({
        url: `/makeFriend/invite/web/getInviteList/${userId}/${current}/${size}`,
        method: "get"
    })
}

//用户同意或拒绝邀请
export function isAgreeInvite(id: number, isAgree: number) {
    return axios({
        url: `/makeFriend/invite/web/isAgreeInvite/${id}/${isAgree}`,
        method: "put"
    })
}